package st.trade;

import st.BasicStockData;

public class Trade {
	private BasicStockData target;
	/** 賣: amount<0, 買: amount>0 */
	private int qty;
	/** 交易價格 */
	public static int CLS_PRICE = 1;
	private int tradePriceType = CLS_PRICE;
	private double tradePrice;

	public Trade(BasicStockData stock, int qty) {
		this.target = stock;
		this.qty = qty;
		if (tradePriceType == CLS_PRICE) {
			tradePrice = target.getClose();
		} else {
			tradePrice = target.getClose();// 預設值
		}
	}

	public double getTradeAmount() {
		return tradePrice * qty;
	}

}
